#include <signal.h>
#include <iostream>
#include <unistd.h>
#include <string>
#include <sys/types.h>

using namespace std;

int main(int argc, char *argv[])
{
    if (argc != 3)
    {
        cout << "Usage: " << argv[0] << " -sig_num pid" << endl;
        exit(1);
    }

    int signum = stoi(argv[1] + 1);
    pid_t pid = stoi(argv[2]);

    int n = kill(pid, signum);
    if (n < 0)
    {
        perror("kill");
        exit(1);
    }

    return 0;
}